import { useState } from 'react';
import { Modal } from 'antd';

const DialogModalIcon = (props: any) => {
  const {dialogVisible, handleSetIcon} = props;
  const [confirmLoading, setConfirmLoading] = useState<boolean>(false);
  const handleOk = () => {
    setTimeout( () => {
      setConfirmLoading(false)
      handleSetIcon('TableOutlined')
    }, 1000)
  }
  const handleCancel = () => {
    handleSetIcon('TableOutlined')
  }

  return (
    <Modal forceRender 
      title="图标选择" 
      visible={dialogVisible} 
      onOk={handleOk} 
      onCancel={handleCancel} 
      confirmLoading={confirmLoading}
    >
      图标列表
    </Modal>
  )
}

export default DialogModalIcon;
